<template>
  <el-card>
    <template #header>
      <div class="card-header">
        <span>资源下载</span>
      </div>
    </template>
    <el-table :data="resources" style="width: 100%">
      <el-table-column prop="name" label="资源名称" />
      <el-table-column label="操作">
        <template #default="scope">
          <el-button type="primary" @click="handleDownload(scope.row)">下载</el-button>
        </template>
      </el-table-column>
    </el-table>
  </el-card>
</template>

<script setup>
import { ref } from 'vue'

const resources = ref([
  { name: '资源 1', url: '#' },
  { name: '资源 2', url: '#' }
])

const handleDownload = (row) => {
  window.open(row.url, '_blank')
}
</script>

<style scoped>
/* 资源下载页面样式 */
</style>